<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>loading demo</title>
    <style type="text/css">
        .loading {
            position: relative;
            width: 70px;
            height: 70px;
        }
        .loading div {
            position: absolute;
            width: 100%;
            height: 100%;
        }
        .loading div:before {
            content: '';
            position: absolute;
            right: 0;
            top: 50%;
            width: 20px;
            height: 8px;
            border-radius: 4px;
            margin-top: -4px;
            background-color: rgba(0, 0, 0, 0.1);
            animation: loading 0.8s ease infinite;
        }

        .loading div:nth-child(2) {
            transform: rotate(45deg);
        }

        .loading div:nth-child(3) {
            transform: rotate(90deg);
        }

        .loading div:nth-child(4) {
            transform: rotate(135deg);
        }
        .loading div:nth-child(5) {
            transform: rotate(180deg);
        }
        .loading div:nth-child(6) {

            transform: rotate(225deg);
        }
        .loading div:nth-child(7) {
            transform: rotate(270deg);
        }
        .loading div:nth-child(8) {
            transform: rotate(315deg);
        }

        .loading div:nth-child(2):before {
            -webkit-animation-delay:0.1s;
            animation-delay:0.1s;
        }
        .loading div:nth-child(3):before {
            -webkit-animation-delay:0.2s;
            animation-delay:0.2s;
        }
        .loading div:nth-child(4):before {
            -webkit-animation-delay:0.3s;
            animation-delay:0.3s;
        }
        .loading div:nth-child(5):before {
            -webkit-animation-delay:0.4s;
            animation-delay:0.4s;
        }
        .loading div:nth-child(6):before {
            -webkit-animation-delay:0.5s;
            animation-delay:0.5s;
        }
        .loading div:nth-child(7):before {
            -webkit-animation-delay:0.6s;
            animation-delay:0.6s;
        }
        .loading div:nth-child(8):before {
            -webkit-animation-delay:0.7s;
            animation-delay:0.7s;
        }


        @keyframes loading {
            0% { background-color: rgba(0, 0, 0, 0.5); }
            100% { background-color: rgba(0, 0, 0, 0.1); }
        }
    </style>
</head>
<body>
    <div class="loading">
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
    </div>
</body>
</html>